package com.uni.dto;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 订单
 * @author yuyanzheng
 *
 */
@NoArgsConstructor
@Data
public class OrderTakerInfoDTO {
	private Long id;
	private String orderNo;
	private Long userId;
	private Long takerUserId;
	private UserBaseInfoDTO user;
	private UserBaseInfoDTO takerUser;
	private Long schoolId;
	private Integer price;
	private Integer type;
	private Integer payType;
	private String address;
	private String phone;
	private String username;
	private Integer status;
	private Date updateTime;
	private Date createTime;
	
	private ExpressOrderDTO expressOrder;
	
	public String getAddress() {
		return StringUtils.replace(address, StringUtils.substring(address, address.length()-5), "*");
	}
	
	public String getPhone() {
		return StringUtils.replace(phone, StringUtils.substring(phone, phone.length()-5), "*");
	}
	
	public String getUsername() {
		return StringUtils.replace(username, StringUtils.substring(username, username.length()-2), "*");
	}
}
